\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\fs28 It doesn't play correctly; sometimes the notes play and sometimes they don't. What's wrong? \
\
A: Very short envelope segments are not guaranteed to work. Your problem will go away by changing the envelope attack times from 0.0004 to values like 0.01. Also, you can use a higher deltaT value in
\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\b0 to provide more leeway for the Music Kit.\
\
The reason this problem occurs is that all parameter updates occur at the "tick rate," which is 1/16th of the sampling rate. For example, at your sampling rate of 22050 Hz, parameters may be updated only every 0.0007 seconds, so the attack time you're using (0.0004 seconds) could fall anywhere in this quantization time. The Music Kit currently does not correct for such micro-quantization.\